【CAD开发】3dxml文件格式开发准备

您所在的位置:网站首页 catia 3dxml 编辑 【CAD开发】3dxml文件格式开发准备

【CAD开发】3dxml文件格式开发准备

2024-07-14 06:11| 来源: 网络整理| 查看: 265

🍺相关文章汇总如下🍺:

🎈【CAD开发】3dxml文件格式简介🎈🎈【CAD开发】3dxml文件格式读取(Python、C++、C#)🎈

文章目录 1、简介2、3DXML查看工具2.1 3DXML Player2.2 Pixyz Studio 3、3DXML 开发用户手册3.1 Model_3dxml3.2 Model_3dxml/Header3.3 Model_3dxml/ProductStructure3.4 ProductStructureType/Reference3D3.5 ProductStructureType/Instance3D3.6 ProductStructureType/ReferenceRep3.7 ProductStructureType/InstanceRep3.8 RepresentationFormatType 4、3DXML文件结构组成5、FAQ5.1 catia导出3dxml的参数设置5.2 catia的3dxml中模型格式 结语

1、简介

https://www.3ds.com/3ds-passport/downloads/

3DXML (dassault systemes 3d xml file)文件格式是一种重要的轻量化CAD数据格式.

3D XML (EXtensible Markup Language) is a universal, lightweight, XML-based format that enables users to capture and share live, accurate 3D data quickly and easily. 3D XML compresses highly complex data, provides rapid file transmission and shorter load times while maintaining the exact geometry of the files exchanged.

Unlike existing formats, 3D XML is fully based on standard XML. Therefore, any software program will be able to read, write, and enrich 3D XML contents using standard tools.

With 3D XML, the use of sophisticated 3D graphics is no longer restricted to engineering departments. These graphics can now easily be incorporated into technical documentation, maintenance manuals, marketing brochures, websites, email communications and many other everyday uses. 在这里插入图片描述 什么是 3DXML 文件?

3DXML 文件包含信息丰富的 3D 图像模型。这些细节可能包括核心几何形状、网格形状、纹理和照明效果。法国公司 Dassault 开发了 3DXML 文件格式,该格式以其准确性、复杂性和跨行业的广泛使用而闻名。

理解 3DXML 的最佳方式是拆分名称 — 3DXML 文件是 3D 的 XML 文件。XML 是一种简单的基于文本的格式,它提供了一个核心,有助于使 3DXML 文件高度可压缩(尤其是作为 zip 文件)。这反过来又使文件易于共享和嵌入 - 并且加载速度快。

尽管如此,3DXML 很复杂,包含曲面、边、顶点、权重、图像和对象的组合。此信息保存在二进制代码中——使用 1 和 0 对数据进行编码的双符号系统。

确保不要将 3DXML 与 X3D(另一个基于 XML 的 3D 建模文件)混淆。

3DXML 文件起源于 Dassault Systèmes,该公司成立于 1920 年代后期,最初在第二次世界大战期间制造飞机。1981 年,一家工业制造子公司从 Dassault Aviation 中分离出来,并开发了一种复杂的计算机辅助绘图 (CAD) 程序,该程序很快被制造业采用。

3DXML 文件高级 CAD 图像(具有纹理、照明和拓扑等元素)并允许大规模共享。它还使 CAD 图像更小、更易于传输,此外还简化了将 3D 图像插入文本文件的过程。

达索为压缩设计了 3DXML。将它们转换为标准 zip 文件很容易。图像的表面数据存储为所谓的 Gregory 补丁 ——一种有效的几何定义形式。这些面片被重新解释回网格表面上的面。您可以在电子邮件、网站、文档中以及作为附件共享 3DXML 文件。

在这里插入图片描述

3DXML 文件的优点:

快速高效。3DXML 重量轻且易于交换。压缩后,您可以一次发送多个。虽然复杂而精确,但它们的加载时间却是出了名的快。作为 zip 文件,您可以将它们拖放到许多应用程序中。

.xml _ 可扩展标记语言是基于文本的代码,对于 Microsoft 记事本来说足够简单。它以干净的结构存储数据,因此各种程序都可以对其进行读写。这使得调整和编辑 3DXML 文件更加容易。

原生标准化。Dassault Systèmes 与其他行业协商改进了 3DXML 文件,但它也在其整个程序线中采用了该格式。如果您使用任何 Dassault 程序,您会发现 3DXML 运行顺畅。

2、3DXML查看工具 2.1 3DXML Player 下载和安装3DXML Player https://www.3ds.com/zh/products-services/3d-xml/downloads/ https://www.3ds.com/products-services/3d-xml/downloads/

Get your 3D XML player here to visualize 3D XML content in a standalone application or embedded in your web browser.

Dassault Systèmes 3D XML 规范和播放器可以快速查看和调整信息丰富的 3D 模型。 在这里插入图片描述 在这里插入图片描述

在ie浏览器中运行这个控件 在这里插入图片描述 3DXMLPlayer.html: 3D XML Player createViewer("container", "viewer", "model/Sample.3dxml");

在这里插入图片描述 在这里插入图片描述

2.2 Pixyz Studio

Pixyz Studio是一款独特的3D数据准备工具,提供一流的曲面细分和优化算法,能够将几乎所有行业领先的CAD解决方案中的CAD数据转换为轻量级,优化的网格,随时可以导出。 Pixyz Studio具有符合人体工程学和直观的用户界面,提供了一个强大而强大的查看器,是显示大量复杂3D数据所必需的。

在这里插入图片描述

Import 在这里插入图片描述

Export 在这里插入图片描述

加载一个3dxml文件。

使用Pixyz Studio导入和处理CAD数据时,将保留原始CAD文件中包含的所有信息的完整性:产品结构(层次结构),原始CAD曲面(BRep / Nurbs),材质分配和外观,PMI和所有类型的元数据。 在这里插入图片描述

通过python脚本导出模型树信息到本地xml文件

Pixyz Studio还附带了一个Python API,可通过嵌入式脚本编辑器访问,允许高级用户创建功能强大的脚本和插件来自动执行复杂的数据准备任务(除了用于批处理的导入/导出功能,仅限于Pixyz Batch产品)。 在这里插入图片描述

3、3DXML 开发用户手册

3D_XML_User_Guide_4.3.pdf:

The 3D XML format is used across all of Dassault Systèmes brands – CATIA, DELMIA, ENOVIA, SIMULIA, 3DVIA, SolidWorks and Virtools. 3D XML format specification is part of “3D For All” initiative for bringing 3D to the masses. Dassault Systemes currently offers a free 3D XML Player for use with the 3DXML format as well as tools to capture 3D from other sources (3D PrintScreen). The offering will continue to grow. 在这里插入图片描述

3.1 Model_3dxml

在这里插入图片描述

3.2 Model_3dxml/Header

在这里插入图片描述

3.3 Model_3dxml/ProductStructure

在这里插入图片描述

3.4 ProductStructureType/Reference3D

在这里插入图片描述

3.5 ProductStructureType/Instance3D

在这里插入图片描述

3.6 ProductStructureType/ReferenceRep

在这里插入图片描述

3.7 ProductStructureType/InstanceRep

在这里插入图片描述

3.8 RepresentationFormatType Types of formats for representation object Default Geometrical representation Technological representation format Tessellated geometrical format (Binary or XML) behavioral representation format standard format (jpeg, bmp, xls, ...)

在这里插入图片描述 在这里插入图片描述

4、3DXML文件结构组成

在这里插入图片描述 3dxml player(达索官网提供的预览工具)的内置的一个测试模型文件:Sample.3dxml 解压之后: 在这里插入图片描述 (1)Manifest.xml 这是入口文件,即起始文件,内容如下:

Sample.3dxml

在这里插入图片描述

(2)Sample.3dxml 这是模型的总的结构树描述文件,文件名不固定,从上面的Manifest.xml中的标签里面获取。

4.0 Quad 3DXml File PVO CATIA V5 2007-04-19 1 3 1 -1.43656787854329e-016 0 1.43656787854329e-016 1 0 0 0 1 -35.3964099358518 202.211474837735 0 Chassis_ReferenceRep_ReferenceRep Design 3DShape 1 3 4 1 7 0.999976282702582 -0.0068872356451857 4.18212442991818e-006 0.00688723564518346 0.999975545259153 -0.00121444177743552 4.18212454184191e-006 0.00121444177743528 0.999999262556567 -33.892135493604 202.211474837734 8.53090922113019 System Direction_ReferenceRep_ReferenceRep Design 3DShape 1 7 8 1 11 0.595836252691761 -0.00312842317081944 0.803099852413572 0.00688723564512438 0.99997554525915 -0.00121444177735138 -0.803076413527011 0.00625474636786796 0.595843227858188 -41.6573762582876 10.0046989184395 -27.7670496220596 11 13 1 0 0 0 1 0 0 0 1 -0.000299999999999301 -137.788525156015 0.00119999999999365 Wheel_ReferenceRep_ReferenceRep Design 3DShape 1 13 14 11 13 1 0 0 0 1 0 0 0 1 -0.000299999999999301 182.211474831485 -0.00040000000000262 11 18 1 0 0 0 1 0 0 0 1 0.000299999999999301 192.211474837735 0.000400000000002621 Axle_ReferenceRep_ReferenceRep Design 3DShape 1 18 19 1 11 0.999691727774109 -0.00691442879300021 -0.0238461756783509 0.00688742231737249 0.99997554393347 -0.00121447469382495 0.0238539898934834 0.00104986162245696 0.999714901837887 428.098150416237 10.8332393530064 -27.7669834952255 -654.7354126 -704.961853 678.0846558 0.5839541554 0.6828992367 -0.4389148355 0.6628675461 -0.7132402062 -0.2278049141 0.4686194956 0.1579147726 0.8691712618 urn:3DXML:Sample.3dxml#6

在这里插入图片描述

(3).3DRep或.xml 这是模型文件的具体几何数据。个数一般有多个。文件内容格式一般分为ascii(.xml)和二进制(。3DRep)。 这里以3sh-1503571-00004560_2_6de6ae8b_898c_62663b46_349f6.xml为例,内容如下:

-200 0 20,-200 0 0,200 0 20,200 0 0,200 0 20,200 0 0,200 1000 20,200 1000 0,-200 1000 0,-200 1000 20,-192.382 1007.34 0,-192.382 1007.34 20,-184.495 1014.39 0,-184.495 1014.39 20,-176.35 1021.14 0,-176.35 1021.14 20,-167.958 1027.57 0,-167.958 1027.57 20,-159.331 1033.7 0,-159.331 1033.7 20,-150.481 1039.49 0,-150.481 1039.49 20,-141.421 1044.95 0,-141.421 1044.95 20,-132.164 1050.07 0,-132.164 1050.07 20,-122.721 1054.83 0,-122.721 1054.83 20,-113.107 1059.24 0,-113.107 1059.24 20,-103.334 1063.29 0,-103.334 1063.29 20,-93.417 1066.97 0,-93.417 1066.97 20,-83.3694 1070.28 0,-83.3694 1070.28 20,-73.2051 1073.21 0,-73.2051 1073.21 20,-62.9384 1075.75 0,-62.9384 1075.75 20,-52.5837 1077.91 0,-52.5837 1077.91 20,-42.1555 1079.68 0,-42.1555 1079.68 20,-31.6683 1081.06 0,-31.6683 1081.06 20,-21.1369 1082.05 0,-21.1369 1082.05 20,-10.5758 1082.64 0,-10.5758 1082.64 20,1.73191e-14 1082.84 0,1.73191e-14 1082.84 20,10.5758 1082.64 0,10.5758 1082.64 20,21.1369 1082.05 0,21.1369 1082.05 20,31.6683 1081.06 0,31.6683 1081.06 20,42.1555 1079.68 0,42.1555 1079.68 20,52.5837 1077.91 0,52.5837 1077.91 20,62.9384 1075.75 0,62.9384 1075.75 20,73.2051 1073.21 0,73.2051 1073.21 20,83.3694 1070.28 0,83.3694 1070.28 20,93.417 1066.97 0,93.417 1066.97 20,103.334 1063.29 0,103.334 1063.29 20,113.107 1059.24 0,113.107 1059.24 20,122.721 1054.83 0,122.721 1054.83 20,132.164 1050.07 0,132.164 1050.07 20,141.421 1044.95 0,141.421 1044.95 20,150.481 1039.49 0,150.481 1039.49 20,159.331 1033.7 0,159.331 1033.7 20,167.958 1027.57 0,167.958 1027.57 20,176.35 1021.14 0,176.35 1021.14 20,184.495 1014.39 0,184.495 1014.39 20,192.382 1007.34 0,192.382 1007.34 20,200 1000 0,200 1000 20,-200 1000 20,-200 1000 0,-200 0 20,-200 0 0,1.73191e-14 1082.84 0,10.5758 1082.64 0,-10.5758 1082.64 0,21.1369 1082.05 0,-21.1369 1082.05 0,31.6683 1081.06 0,-31.6683 1081.06 0,42.1555 1079.68 0,-42.1555 1079.68 0,52.5837 1077.91 0,-52.5837 1077.91 0,62.9384 1075.75 0,-62.9384 1075.75 0,73.2051 1073.21 0,-73.2051 1073.21 0,83.3694 1070.28 0,-83.3694 1070.28 0,93.417 1066.97 0,-93.417 1066.97 0,103.334 1063.29 0,-103.334 1063.29 0,113.107 1059.24 0,-113.107 1059.24 0,122.721 1054.83 0,-122.721 1054.83 0,132.164 1050.07 0,-132.164 1050.07 0,141.421 1044.95 0,-141.421 1044.95 0,150.481 1039.49 0,-150.481 1039.49 0,159.331 1033.7 0,-159.331 1033.7 0,167.958 1027.57 0,-167.958 1027.57 0,176.35 1021.14 0,-176.35 1021.14 0,184.495 1014.39 0,-184.495 1014.39 0,192.382 1007.34 0,-192.382 1007.34 0,200 1000 0,-200 1000 0,200 0 0,-200 0 0,-200 0 20,200 0 20,-200 1000 20,200 1000 20,-192.382 1007.34 20,192.382 1007.34 20,-184.495 1014.39 20,184.495 1014.39 20,-176.35 1021.14 20,176.35 1021.14 20,-167.958 1027.57 20,167.958 1027.57 20,-159.331 1033.7 20,159.331 1033.7 20,-150.481 1039.49 20,150.481 1039.49 20,-141.421 1044.95 20,141.421 1044.95 20,-132.164 1050.07 20,132.164 1050.07 20,-122.721 1054.83 20,122.721 1054.83 20,-113.107 1059.24 20,113.107 1059.24 20,-103.334 1063.29 20,103.334 1063.29 20,-93.417 1066.97 20,93.417 1066.97 20,-83.3694 1070.28 20,83.3694 1070.28 20,-73.2051 1073.21 20,73.2051 1073.21 20,-62.9384 1075.75 20,62.9384 1075.75 20,-52.5837 1077.91 20,52.5837 1077.91 20,-42.1555 1079.68 20,42.1555 1079.68 20,-31.6683 1081.06 20,31.6683 1081.06 20,-21.1369 1082.05 20,21.1369 1082.05 20,-10.5758 1082.64 20,10.5758 1082.64 20,1.73191e-14 1082.84 20 0 -1 0,0 -1 0,0 -1 0,0 -1 0,1 0 0,1 0 0,1 0 0,1 0 0,-0.707083 0.70713 0,-0.707083 0.70713 0,-0.680166 0.733058 0,-0.680166 0.733058 0,-0.652272 0.757985 0,-0.652272 0.757985 0,-0.623463 0.781853 0,-0.623463 0.781853 0,-0.593799 0.804614 0,-0.593799 0.804614 0,-0.563311 0.826245 0,-0.563311 0.826245 0,-0.532029 0.846726 0,-0.532029 0.846726 0,-0.499985 0.866034 0,-0.499985 0.866034 0,-0.467238 0.884131 0,-0.467238 0.884131 0,-0.433882 0.90097 0,-0.433882 0.90097 0,-0.399884 0.916566 0,-0.399884 0.916566 0,-0.365337 0.930875 0,-0.365337 0.930875 0,-0.330271 0.943886 0,-0.330271 0.943886 0,-0.294748 0.955575 0,-0.294748 0.955575 0,-0.258797 0.965932 0,-0.258797 0.965932 0,-0.22251 0.97493 0,-0.22251 0.97493 0,-0.185888 0.982571 0,-0.185888 0.982571 0,-0.149022 0.988834 0,-0.149022 0.988834 0,-0.111942 0.993715 0,-0.111942 0.993715 0,-0.0747093 0.997205 0,-0.0747093 0.997205 0,-0.0373852 0.999301 0,-0.0373852 0.999301 0,0 1 0,0 1 0,0.0373852 0.999301 0,0.0373852 0.999301 0,0.0747093 0.997205 0,0.0747093 0.997205 0,0.111942 0.993715 0,0.111942 0.993715 0,0.149022 0.988834 0,0.149022 0.988834 0,0.185888 0.982571 0,0.185888 0.982571 0,0.22251 0.97493 0,0.22251 0.97493 0,0.258797 0.965932 0,0.258797 0.965932 0,0.294748 0.955575 0,0.294748 0.955575 0,0.330271 0.943886 0,0.330271 0.943886 0,0.365337 0.930875 0,0.365337 0.930875 0,0.399884 0.916566 0,0.399884 0.916566 0,0.433882 0.90097 0,0.433882 0.90097 0,0.467238 0.884131 0,0.467238 0.884131 0,0.499985 0.866034 0,0.499985 0.866034 0,0.532029 0.846726 0,0.532029 0.846726 0,0.563311 0.826245 0,0.563311 0.826245 0,0.593799 0.804614 0,0.593799 0.804614 0,0.623463 0.781853 0,0.623463 0.781853 0,0.652272 0.757985 0,0.652272 0.757985 0,0.680166 0.733058 0,0.680166 0.733058 0,0.707083 0.70713 0,0.707083 0.70713 0,-1 0 0,-1 0 0,-1 0 0,-1 0 0,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,-0 -0 -1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1,0 0 1

在这里插入图片描述

5、FAQ 5.1 catia导出3dxml的参数设置

在这里插入图片描述 在这里插入图片描述

5.2 catia的3dxml中模型格式

There is 3 different 3DXML format supported by CATIA V5 :

Dynamic Tesselation (Exact geometry)Static Tesselation (Catia CGR)Xml Tesselation (ASCII and published)

The 3D XML settings page (Tools > Options > General > Compatibility > 3D XML) concerns the following settings categories: 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述

When saving a CATProduct as a 3D XML document, three formats are available for the geometry:

XML Tessellation (1)Provides the representation of a part through a list of organized triangles (mesh) in XML format. Can be used for easy geometry exchange. (2)lets you export geometry as 3D XML Mesh. This format is intended to provide a light visualization format for 3DForAll and some simplifications are made when saving a file (e.g. faces of bodies are grouped by color in a single face). (3)Some functionalities such as DMU measure, section, etc. may not be supported. Therefore, it is not recommended to use this format when working with advanced DMU scenarios (involving the use of measure or interference functionalities, for instance).

Static Tessellation Compressed triangular mesh with static accuracy. If the assembly is in design mode, the accuracy used is the one specified in the visualization settings. If the assembly is in visualization mode, the accuracy of each component will be that of the associated CGR in the V5 Cache.

Dynamic Tessellation (1)Compressed representation containing a rough triangular mesh that can be refined when zooming in to discover details of the geometry (Dynamic Level of Details). The maximum reachable accuracy is provided by the user at generation time using the Accuracy setting. (2)To benefit from Dynamic Level of details, use 3D XML Player or 3DLive (Explore and Examine window). (3)When opening a 3D XML file with dynamic tessellation in CATIA V5, the dynamic tessellation is converted at open time to a static triangular representation (with the accuracy selected at generation) for compatibility reason.

Export of Lineic Elements (1)Lineic elements (wires, axis systems, points) are not exported by default in dynamic and Static Tessellation mode. (2)To export these elements, you must check the option Tools > Options > Infrastructure > Product Structure > Cgr Management, Save lineic elements in cgr. (3)Lineic elements are never exported in XML Tessellation mode.

在这里插入图片描述

结语

如果您觉得该方法或代码有一点点用处,可以给作者点个赞,或打赏杯咖啡;╮( ̄▽ ̄)╭ 如果您感觉方法或代码不咋地//(ㄒoㄒ)//,就在评论处留言,作者继续改进;o_O??? 如果您需要相关功能的代码定制化开发,可以留言私信作者;(✿◡‿◡) 感谢各位童鞋们的支持!( ´ ▽´ )ノ ( ´ ▽´)っ!!!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3